package link.anyauto.web;

public class UserBuilder {
    private String name;
    private String id;
    private String pwd;
    private int age;
    private String gender;

    public UserBuilder setName(String name) {
        this.name = name;
        return this;
    }

    public UserBuilder setId(String id) {
        this.id = id;
        return this;
    }

    public UserBuilder setPwd(String pwd) {
        this.pwd = pwd;
        return this;
    }

    public UserBuilder setAge(int age) {
        this.age = age;
        return this;
    }

    public UserBuilder setGender(String gender) {
        this.gender = gender;
        return this;
    }

    public User createUser() {
        return new User(name, id, pwd, age, gender);
    }
}